/*
* Copyright (C) 2008-2009 J-P Nurmi jpnurmi@gmail.com
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
* License for more details.
*
* $Id: ircserverbuffer.h 581 2009-05-19 16:40:38Z jpnurmi $
*/

#ifndef IRC_SERVERBUFFER_H
#define IRC_SERVERBUFFER_H

#include <ircglobal.h>
#include <ircbuffer.h>

namespace Irc
{
    class ServerBufferPrivate;

    class IRC_EXPORT ServerBuffer : public Buffer
    {
        Q_OBJECT
        Q_PROPERTY(QByteArray ident READ ident WRITE setIdent)
        Q_PROPERTY(QByteArray nick READ nick WRITE setNick)
        Q_PROPERTY(QByteArray password READ password WRITE setPassword)
        Q_PROPERTY(QByteArray realName READ realName WRITE setRealName)

    public:
        ~ServerBuffer();

        QByteArray ident() const;
        void setIdent(const QByteArray& ident);

        QByteArray nick() const;
        void setNick(const QByteArray& nick);

        QByteArray password() const;
        void setPassword(const QByteArray& password);

        QByteArray realName() const;
        void setRealName(const QByteArray& realName);

    private:
        ServerBuffer(const QByteArray& name, Session* session);
        Q_DECLARE_PRIVATE(ServerBuffer)
        Q_DISABLE_COPY(ServerBuffer)
        friend class Session;
        friend class SessionPrivate;
    };
}

#endif // IRC_SERVERBUFFER_H
